package com.wanmait.recruit.service.impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.recruit.mapper.CityMapper;
import com.wanmait.recruit.pojo.City;
import com.wanmait.recruit.service.CityService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;

@Service
@Transactional
public class CityServiceImpl implements CityService {
    @Resource
    private CityMapper cityMapper;
    @Override
    public void insert(City object) {

    }

    @Override
    public void delete(City object) {

    }

    @Override
    public void update(City object) {

    }

    @Override
    public PageInfo<City> search(int pageNum, int pageSize) {
        return null;
    }

    @Override
    public String selectByPositionTypeId(Integer cityId) {
        City city = cityMapper.selectByPrimaryKey(cityId);
        return city.getShortName();
    }

    @Override
    public ArrayList<City> selectFindAll() {
        return cityMapper.findAll();
    }
}
